<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
</html>
<script>
	//2344850@qq.com
	//分析@必须要有的
	//@的前面 [0-9a-z]{2,16}
	//@的后面 [0-9a-z]{2,4}    点是一个特殊字符 \.com

	var email = prompt('请输入你的邮箱');
	var re = /^[0-9a-z_-]{2,16}@[0-9a-z]{2,4}\.com$/g;
	if(re.test(email)){
		alert('邮箱正确');
	}else{
		alert('邮箱不对');
	}
</script>
